package com.example.covid19.mapper;

import com.example.covid19.common.Dto.Clastab;
import com.example.covid19.entity.Classes;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author BaiZhengChun
 * @since 2023-03-07
 */
public interface ClassesMapper extends BaseMapper<Classes> {
    @Select("SELECT " +
            " classes.ccid,  " +
            " classes.clname,  " +
            " majeur.majeurname,  " +
            " cravate.rname,  " +
            " college.cname " +
            "FROM " +
            " classes " +
            " INNER JOIN " +
            " majeur " +
            " ON  " +
            "  classes.mid = majeur.mid " +
            " INNER JOIN " +
            " cravate " +
            " ON  " +
            "  majeur.xid = cravate.xid " +
            " INNER JOIN " +
            " college " +
            " ON  " +
            "  cravate.cid = college.cid")
    List<Clastab>getlist();

}
